package com.kuang.service;

import com.kuang.dao.CourseMapper;
import com.kuang.pojo.Courses;

import java.util.List;

public class CourseServiceImpl implements CourseService{

    private CourseMapper courseMapper;

    public void setCourseMapper(CourseMapper courseMapper) {
        this.courseMapper = courseMapper;
    }

    public int addCourse(Courses course){return courseMapper.addCourse(course);}

    @Override
    public int updateCourse(Courses course) {
        return courseMapper.updateCourse(course);
    }

    @Override
    public int deleteCourseByCno(int Cno) {
        return courseMapper.deleteCourseByCno(Cno);
    }

    @Override
    public Courses queryCourseByCno(int Cno) {
        return courseMapper.queryCourseByCno(Cno);
    }

    @Override
    public List<Courses> queryAllCourse() {
        return courseMapper.queryAllCourse();
    }

    @Override
    public List<Courses> queryCourseBySTno(String STno){return courseMapper.queryCourseBySTno(STno);}
}
